<?php

class ShowtimesController extends Zend_Controller_Action {

    public function init() {
        $this->view->baseUrl = $this->_request->getBaseUrl();
    }

    public function indexAction() {
        // title
        $this->view->title = "Show Times";
        $showBD = new Application_Model_ShowingAt;
        $this->view->days = $showBD->getDays();
        
        $param = $this->getRequest()->getParams();
       
        if(isset($param['date'])) {
        	$this->view->date = $param['date'];
        	$date = $param['date']."%";
        } else {
        	$this->view->date = $this->view->days[0]['Date'];
        	$date = $this->view->days[0]['Date']."%";
        }
        $this->view->shows = $showBD->getShowsD($date); 
    
    }

}

